package com.homework5;
import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

public class clietn {
    public static void main(String[] args) {
        try {
            Socket socket = new Socket("127.0.0.1", 8888);
            OutputStream outputStream = socket.getOutputStream();
            String str="hello,服务器，我是客户端";
            outputStream.write(str.getBytes());
        } catch (IOException e) {
            e.printStackTrace();
        }

    }
}
